package com.solexnlp.simplesemantic.core;

import android.util.Log;

import com.solexnlp.simplesemantic.data.AnalysisResult;
import com.solexnlp.simplesemantic.data.SimpleSemanticConfiguration;

public class SimpleSemanticCore {

    final String TAG = "SimpleSemanticCore";

    static {
        System.loadLibrary("simplesemantic");
    }


    public void init(SimpleSemanticConfiguration configuration) {
        int ret = Initialization(configuration);
        if (ret != 0) {
            Log.e(TAG, "Initialization error, please check: " + ret);
        }
    }

    public AnalysisResult analysisOfSentence(String sentence) {
        return AnalysisOfSentence(sentence);
    }

    // ===================Native==================

    native int Initialization(SimpleSemanticConfiguration configuration);

    native AnalysisResult AnalysisOfSentence(String sentence);

}
